 
  
var o = require("../../utils/config"), n = require("../../utils/request"); 
require("../../utils/storage") ;

Page({
    data: { 
        loadingHidden: !0,
        loadinginfo: "加载中...", 
        phoneHeight: getApp().globalData.systemHeight,
        phoneWidth: getApp().globalData.systemWidth,
        pageIndex: 1,
        pageSize: 10,
        totalSize: 0,
        reportList: [],
        showDivder: !1,
        x: getApp().globalData.systemWidth - 120,
        y: getApp().globalData.systemHeight - 270,
        scale: 2,
        imagePath: o.resourceRoot,
    
    },
    onShow: function() {
        this.setData({
            pageIndex: 1,
            pageSize: 10,
            totalSize: 0,
            reportList: [],
            showDivder: !1
        }), this.getlist();
    },
  
 
    getlist: function() {
        var t = this;
        wx.showLoading({
            title: "正在加载中...",
            mask: !0
        });
        var e = "pageIndex=" + this.data.pageIndex + "&pageSize=" + this.data.pageSize;
        let openid=wx.getStorageSync("openid")
        n.post1("/wechat/Home/getMedicalReportList?user_id=1" + e, {openid:openid}).then(function(e) {
            if (1 === e.code) {
              console.log(e)
                var a = []; 
                e.total <= t.data.pageSize && t.setData({
                    showDivder: !0
                }), t.setData({
                    reportList: e.data,
                    totalSize: e.total
                })
               
              }
              })
 
      
 
      
    },
    onScrollLower: function() {
        var t = this.data.pageIndex + 1;
        (t - 1) * this.data.pageSize > this.data.totalSize ? this.setData({
            showDivder: !0
        }) : (this.setData({
            pageIndex: t
        }), this.getlist());
    } 
});